<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});




Route::namespace('Admin')->group(function () {
    Route::get('admin/index', 'IndexController@index');
    Route::get('admin/users', 'AdminUserController@index');
    Route::post('admin/users/add','AdminUserController@addUser');
    Route::get('admin/wechat/menu','WeChatController@menu');
    Route::post('admin/menu/add','WeChatController@menuadd');
});

Route::group(['middleware'=>'web'],function() {
    Route::any('/wechat','WeChat\EasyWeChatController@index');
    Route::get('/oauth_callback','WeChat\OauthCallbackController@index');
});